﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for item
/// </summary>
namespace ODM2KMZ.RSS
{
    public class item
    {
        public string guid { get; set; }
        public DateTime pubDate { get; set; }
        public string title { get; set; }
        public string description { get; set; }
        public string author { get; set; }
        public string link { get; set; }
        public string category { get; set; }
        public string comments { get; set; }
        public string enclosure { get; set; }
        public string source { get; set; }
        public point point { set; get; }


        public item()
        {
            //
            // TODO: Add constructor logic here
            //
            guid = string.Empty;
            title = string.Empty;
            description = string.Empty;
            author = string.Empty;
            point = new point() { crs = string.Empty, latitude = string.Empty, longitude = string.Empty };
        }
        public string pubDateString()
        {
            if (pubDate != null)
            {
                return pubDate.ToString("ddd, dd MMM yyyy hh:mm:ss 'GMT'");
            }

            return DateTime.UtcNow.ToString("ddd, dd MMM yyyy hh:mm:ss 'GMT'");

        }
    }
}